package com.itkang.state;

/**
 * <p>
 * 场景:
 * </p>
 *
 * @author york yuan
 * @version 1.0
 * @since 15/7/9下午2:31
 */
public class LightOffState extends State {
    OpenLight openLight;

    public LightOffState(OpenLight openLight) {
        this.openLight = openLight;
    }

    /**
     * 操作方法,操作完成后,设置操作对象的状态对象
     */
    @Override
    public void handle() {
        System.out.println("light is off!");
        openLight.setState(openLight.LightOnState);
    }
}
